<?php
namespace app\patrol\logic;

class UserLogic extends BaseLogic {

    /**
     * 获取所用用户查询条件
     * @param $openid
     * @param $keywords
     * @return array
     */
    public function get_search_user_maps($openid,$keywords){
        $maps = [];
        $maps[] = ['role','<>',1];
        $maps[] = ['status','=',1];
        $maps[] = ['openid','<>',$openid];

        if(!empty($keywords)){
            $maps[] = ['username|department|position','like','%' . $keywords . '%'];
        }
        return $maps;
    }
}